# Python 2.6.4
# Project Euler, Problem 12
# Copyright 2010 Talha Zaman

from math import sqrt

def factors(n):
    count=0
    for i in range(1, int(sqrt(n))+1):
        if (n%i==0): count += 2
    return count

tri = 1
tn = 1
while factors(tri) <= 500:
    tn += 1
    tri += tn
print tn, tri
